package day1023_2;

public class E5 {
    String[]  arr={"一二三" , "三", null};
    public void test(int bianHao)throws  NullPointerException{
        System.out.println(arr[bianHao].length());
    }

    public static void main(String[] args) {
       E5 e=new E5();//调用test方法
        try {
            e.test(2);//对象.方法
        } catch (NullPointerException nullPointerException) {
            nullPointerException.printStackTrace();
        }
    }
}
